<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Pragma"   content="no-cache">   
<meta http-equiv="Cache-Control"   content="no-cache">   
<meta http-equiv="Expires"   content="0">   
<title>新增服装信息</title>
<jsp:include page="/common.jsp" />
<script type="text/javascript" src="${pageContext.request.contextPath }/resource/jquery-lightbox-0.5/js/jquery.lightbox-0.5.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
		regformSubmit("${pageContext.request.contextPath}/system/prod/add.htm");
		//$('a').lightBox();
	});
	
	function afterUploadSubmit(data) {
		switch (data) {
		case "0":
			$.messager.alert("提示", "操作失败,请检查文件大小<=1M.", "error");
			break;
		case "1":
			$.messager.alert("提示", "操作成功!", "info", function() {
				$("#productImg").hide().attr(
						'src',
						'');
				$("#productImg").hide().attr(
						'src',
						'${pageContext.request.contextPath}/system/prod/getUploadImage.htm?tmp='+new Date())
						.fadeIn();
			});
			break;
		}
	}
</script>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/resource/jquery-lightbox-0.5/css/jquery.lightbox-0.5.css" media="screen" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/resource/form.css">
</head>
<body>
<form  method="post" id="addform">
		<table style="width:100%;height:100%;">
			<tr>
				<td id="${formBean.bean.id }"><label>服装名称</label></td>
				<td>
					<form:input path="formBean.bean.productName" alt="服装名称#true"/> <span class="required">*</span>
				</td>
				<td rowspan="8" width="200">
				<%-- <a href="${pageContext.request.contextPath}/system/prod/show.htm?id=${formBean.bean.id }" title="点击查看或关闭"> --%>
					<img id="productImg" width="200" height="245" src="${pageContext.request.contextPath}/system/prod/show.htm?id=${formBean.bean.id }">
				<!-- </a> -->
				</td>
			</tr>
			<tr>
				<td ><label>类别</label></td>
				<td>
					<form:select path="formBean.bean.category.id" alt="服装类别#true#Int">
						<form:options items="${formBean.categories}" itemValue="id" itemLabel="categoryName"/> <span class="required">*</span>
					</form:select>
				</td>
			</tr>
			<tr>
				<td><label>颜色</label></td>
				<td>
					<form:input path="formBean.bean.productColor" />
				</td>
			</tr>
			<tr>
				<td><label>尺寸</label></td>
				<td>
					<form:input path="formBean.bean.productSize"/>
				</td>
			</tr>
			<tr>
				<td><label>入库价格</label></td>
				<td>
					<form:input path="formBean.bean.productPrice1" alt="入库价格#true#Number"/> <span class="required">*</span>
				</td>
			</tr>
			<tr>
				<td><label>分销价格</label></td>
				<td>
					<form:input path="formBean.bean.productPrice2" alt="分销价格#true#Number"/> <span class="required">*</span>
				</td>
			</tr>
			<tr>
				<td><label>零售价格</label></td>
				<td>
					<form:input path="formBean.bean.productPrice3" alt="零售价格#true#Number"/> <span class="required">*</span>
				</td>
			</tr>
			<tr>
				<td><label>货币单位</label></td>
				<td>
					<form:select path="formBean.bean.productPriceUnit" alt="货币单位#true"> <span class="required">*</span>
						<form:option value="￥" label="人民币"/>  
						<form:option value="$" label="美元"/>  
						<form:option value="NT" label="新台币"/>  
					</form:select>
				</td>
			</tr>
			<tr>
				<td><label>生产厂家</label></td>
				<td>
					<form:input path="formBean.bean.productFactory" />
				</td>
				<td rowspan="2" style="margin: 0;padding:0;height:6em;">
					<iframe src="${pageContext.request.contextPath}/system/prod/toUpload.htm" style="width:100%;height:100%;overflow:hidden" scrolling="no" frameborder="0"></iframe>
				</td>
			</tr>
			<tr>
				<td><label>备注</label></td>
				<td >
					<form:textarea path="formBean.bean.productNote" rows="3" cols="20" />
				</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td><input id="btnSubmit" type="button" value="提交" /> <input type="reset" value="重置" /></td>
				<td>&nbsp;</td>
			</tr>
		</table>
</form>
</body>
</html>